/*
 * Copyright 2014 Graham Smith
 */
package uk.co.wobblycogs.vegas.scan;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import org.junit.rules.TemporaryFolder;

/**
 *
 * @author Graham Smith
 */
public class FileTestUtilities {

	private FileTestUtilities() {
	}

	public static void createMediaTree(TemporaryFolder folder) throws IOException {
		File folder1 = folder.newFolder("folder1");
		File f = new File(folder1, "media.with.dots.mp4");
		f.createNewFile();
		try (FileOutputStream out = new FileOutputStream(f)) {
			out.write(new byte[1000]);
		}
		new File(folder1, "bar.mp4").createNewFile();

		File folder2 = folder.newFolder("folder2");
		new File(folder2, "media2.mp3").createNewFile();
		new File(folder2, "what.mp2").createNewFile();

		File folder21 = folder.newFolder("folder2", "folder2.1");
		new File(folder21, "baz.mts").createNewFile();
		new File(folder21, "boz.m2ts").createNewFile();
		new File(folder21, "text_file.txt").createNewFile();
		new File(folder21, "media file with a space.MTS").createNewFile();
	}

}
